package com.jingyanzi.member.domain.result;

import java.io.Serializable;
import java.util.Map;

public interface ResultDO extends Serializable {
	String FIRST_MODEL_KEY = "first_model";
	String SECOND_MODEL_KEY = "second_model";
	String THIRD_MODEL_KEY = "third_model";
	String PROPERTY_VALUE_SET_ERROR = "534";
	String PROPERTY_VALUE_SET_ERROR_MSG = "属性设置失败";
	String QUERY_VALUE_SET_ERROR = "522";
	String QUERY_VALUE_IS_NULL_ERROR_MSG = "值不能为空";
	String SYSTEM_EXCEPTION_ERROR = "500";
	String SYSTEM_EXCEPTION_ERROR_MSG = "服务器错误";
	String VERIFY_CODE_ERROR = "verify code error";
	String VERIFY_CODE_ERROR_MSG = "验证码错误";
	String QUERY_PERSONAL_ERROR = "query personal info error";
	String QUERY_PERSONAL_ERROR_MSG = "查询个人信息错误";
	String QUERY_GROUP_ERROR = "query group info error";
	String QUERY_GROUP_ERROR_MSG = "查询团队信息错误";
	String QUERY_COMPANY_ERROR = "query company info error";
	String QUERY_COMPANY_ERROR_MSG = "查询公司信息错误";
	String DB_NO_ERROR = "db no is invalid";
	String DB_NO_ERROR_MSG = "分库标识错误";
	String BALANCE_LACK_ERROR = "lack of balance invalid";
	String BALANCE_LACK_ERROR_MSG = "账户余额不足";

	String ACCOUNT_RECHARGE_ERROR = "7001";
	String ACCOUNT_ADDPAY_ERROR = "7002";
	String ACCOUNT_ADDFINANCE_ERROR = "7003";

	String ANALYSIS_MODIFI_ERROR = "7004";

	String CHANCE_ADD_ERROR = "7005";

	String CONTACT_GET_ERROR = "7006";

	String TRACK_ADD_ERROR = "7007";

	String MEMBER_ADD_ERROR = "7008";
	String MEMBER_REMOVE_ERROR = "7009";
	String MEMBER_EXCHANGEGIFT_ERROR = "7010";

	String FAMILYMEMBER_CHECKTELEPHONE_ERROR = "7011";
	
	String CUSTOMER_ADD_ERROR = "7012";
	String CUSTOMER_GET_ERROR = "7013";
	String CUSTOMER_MERGE_ERROR = "7014";
	String CUSTOMER_COPYFAMILYMEMBER_ERROR = "7015";
	String CUSTOMER_GETCUSTOMER_ERROR = "7016";

	String PARAM_ERROR = "7017";
	String PARAM_ERROR_MSG = "参数错误";
	String NO_DATA_ERROR = "7018";

	String ACCOUNT_ADD_ERROR = "7019";

	/** 线索文件读取/写入失败 */
	String IMPORT_FILE_ERROR = "7020";
	/** 线索数据验证失败 */
	String IMPORT_CHECK_ERROR = "7021";
	/** 线索数据导入失败 */
	String IMPORT_DATA_ALL_ERROR = "7022";
	/** 线索数据部分导入失败 */
	String IMPORT_DATA_ERROR = "7023";

	/**
	 * 设置请求成功标志。
	 * 
	 * @param success
	 *            成功标志
	 */
	void setSuccess(boolean success);

	/**
	 * 请求是否成功。
	 * 
	 * @return 如果成功，则返回<code>true</code>
	 */
	boolean isSuccess();

	/**
	 * 获取返回码
	 * 
	 * @return 返回码
	 */
	String getErrorCode();

	/**
	 * 设置返回码
	 * 
	 * @param code
	 */
	void setErrorCode(String code);

	String getErrorMsg();

	void setErrorMsg(String msg);

	/**
	 * 返回子的返回码
	 * 
	 * @return
	 */
	String getErrorSubCode();

	/**
	 * 设置子返回码
	 * 
	 * @param code
	 */
	void setErrorSubCode(String code);

	String getErrorSubMsg();

	void setErrorSubMsg(String msg);

	/**
	 * 取得model对象
	 * 
	 * @param key
	 *            字符串key
	 * @return model对象
	 */
	Object getModel(String key);

	/**
	 * 设置model对象。
	 * 
	 * @param key
	 *            字符串key
	 * @param model
	 *            model对象
	 */
	void setModel(String key, Object model);

	/**
	 * 取得所有model对象。
	 * 
	 * @return model对象表
	 */
	Map<String, Object> getModels();

}
